#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include <QPropertyAnimation>

namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT

public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();

    void setIconAndText(const QString& icon, const QString& text, int pageId);

    int getPageId();

    void clearBackGround();

    void showStyle();

    void mousePressEvent(QMouseEvent *event);

    //避免点击跳动
    void mouseMoveEvent(QMouseEvent *event);

signals:
    void btClick(int id);

private:
    Ui::BtForm *ui;
    int pageId;
    QPropertyAnimation *line1Animation;
    QPropertyAnimation *line2Animation;
    QPropertyAnimation *line3Animation;
    QPropertyAnimation *line4Animation;

};

#endif // BTFORM_H
